/**************************************************************************** **
 * Copyright (C) 2001-2020 Inhand Networks, Inc.
 **************************************************************************** **/

/* ************************************************************************** **
 *     MODULE NAME            : system
 *     LANGUAGE               : C
 *     TARGET ENVIRONMENT     : Any
 *     FILE NAME              : mqtt_client.h
 *     FIRST CREATION DATE    : 2022/01/06
 * --------------------------------------------------------------------------
 *     Version                : 1.0
 *     Author                 : EExuke
 *     Last Change            : 2022/01/06
 *     FILE DESCRIPTION       : API exported to external moduels
** ************************************************************************** */
#ifndef _MQTT_CLIENT_H_
#define _MQTT_CLIENT_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <mosquitto.h>

/*------------------Macro Definition-------------------------*/
#define MQTT_TOPIC_TEMPERATURE    "example/temperature"
/*#define MQTT_SERVER_ENDPOINT      "test.mosquitto.org"*/
#define MQTT_SERVER_ENDPOINT      "localhost"
#define DEF_USERNAME              "user1"
#define DEF_PASSWORD              "123456"

typedef enum {
	MQTT_STATE_INIT = 0,
	MQTT_STATE_CONNECTING,
	MQTT_STATE_CONNECTED,
	MQTT_STATE_LOOP,
	MQTT_STATE_DISCONNECTED,
} MQTT_STATE;
/*------------------End of Macro Definition------------------*/

/*------------------API Definition---------------------------*/
/*------------------End of API Definition--------------------*/

#endif /* End of _MQTT_CLIENT_H_ */

